package com.cslg.service;

import com.cslg.mapper.NoticeMapper;
import com.cslg.pojo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {
    @Autowired
    private NoticeMapper noticeMapper;
    @Override
    public List<Notice> selectTop5() {
        List<Notice> notices = noticeMapper.selectByTop5Notice();
        return notices;
    }

    @Override
    public int insertNotice(Notice notice) {
        int i = noticeMapper.insertSelective(notice);
        return i;
    }
}
